<?php

 $line= $Managedfund[0]['managedfund'];
 $this->CSV->addRow(array_keys($line));
 foreach ($Managedfunds as $Managedfund)
 {
      $line = $Managedfund['managedfund'];
       $this->CSV->addRow($line);
 }
 
 $filename=’TaxedPortfolio';
 echo  $this->CSV->render($filename.Csv);


  
